package com.znsd.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 库存单元表
 * </p>
 *
 * @author Liuyl
 * @since 2019-10-16
 */
@TableName("sku_info")
public class SkuInfo extends Model<SkuInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 库存id(itemID)
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 商品id
     */
    @TableField("spu_id")
    private Long spuId;
    /**
     * 价格
     */
    private Double price;
    /**
     * sku名称
     */
    @TableField("sku_name")
    private String skuName;
    /**
     * 商品规格描述
     */
    @TableField("sku_desc")
    private String skuDesc;
    private Double weight;
    /**
     * 品牌(冗余)
     */
    @TableField("tm_id")
    private Long tmId;
    /**
     * 三级分类id（冗余)
     */
    @TableField("catalog3_id")
    private Long catalog3Id;
    /**
     * 默认显示图片(冗余)
     */
    @TableField("sku_default_img")
    private String skuDefaultImg;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getSkuName() {
        return skuName;
    }

    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public String getSkuDesc() {
        return skuDesc;
    }

    public void setSkuDesc(String skuDesc) {
        this.skuDesc = skuDesc;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public Long getTmId() {
        return tmId;
    }

    public void setTmId(Long tmId) {
        this.tmId = tmId;
    }

    public Long getCatalog3Id() {
        return catalog3Id;
    }

    public void setCatalog3Id(Long catalog3Id) {
        this.catalog3Id = catalog3Id;
    }

    public String getSkuDefaultImg() {
        return skuDefaultImg;
    }

    public void setSkuDefaultImg(String skuDefaultImg) {
        this.skuDefaultImg = skuDefaultImg;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SkuInfo{" +
        "id=" + id +
        ", spuId=" + spuId +
        ", price=" + price +
        ", skuName=" + skuName +
        ", skuDesc=" + skuDesc +
        ", weight=" + weight +
        ", tmId=" + tmId +
        ", catalog3Id=" + catalog3Id +
        ", skuDefaultImg=" + skuDefaultImg +
        "}";
    }
}
